package com.yc.jpyy.ciitems.service.impl;


import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;
import com.yc.jpyy.ciitems.dao.CiitemsDao;
import com.yc.jpyy.ciitems.service.*;

@Service

public class CiitemsServiceImpl implements CiitemsService {

	@Autowired
	private CiitemsDao ciitemsDao;

	@Override
	public List<Map<String, Object>> ciitemsService(Map<String, Object> paramsMap)  throws DataAccessException {
           return ciitemsDao.ciitemsDao(paramsMap);
	}

	@Override
	public Map<String, Object> getTwoInsuranceCitems(
			Map<String, Object> paramsMap) throws DataAccessException {
		Map<String,Object> resultMap = new HashMap<>();
		List<Map<String, Object>> list = ciitemsDao.getTwoInsuranceCitems(paramsMap);
		if(list != null && list.size() > 0){
			resultMap.put("returnCode", 1);
			resultMap.put("ListData", list);
			resultMap.put("returnMsg", "操作成功");
		}else{
			resultMap.put("returnCode", 0);
			resultMap.put("returnMsg", "获取失败");
		}
		return resultMap;
	}
}
